<?php
ob_start();
session_start();
include "checksession.php";
$id_member = $_SESSION["id_member"];
$Emp_id = $_GET['emp_id'];
$Cn_id = $_GET['cn_id'];
$C_id = $_GET['c_id'];
$Oth_id  = $_GET['oth_id'];


?>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Adinop Co., Ltd. was founded as an ingredients importer and local manufacturers’ distributor in 1986. We also function as an exporter of finished products</title>
          <!--<script src="http://code.jquery.com/jquery-latest.js"></script>-->
        <link rel="stylesheet" href="../css/style.css"/>
        <!--         <link rel="stylesheet" href="../css/validationEngine.jquery.css" type="text/css" />
               <script type="text/javascript" src="../js/jquery/jquery.js"></script>    
        <script type="text/javascript" src="../js/jquery/jquery.validationEngine.js"></script>-->
        <script type="text/javascript" src="../js/jquery/jquery-latest.min.js"></script>

    </head>
    <body>
        <div  align="center">
            <fieldset>
                <legend class="nameTitle">ลงทะเบียนประวัติคอมพิวเตอร์</legend>
                <form  
                    method="Post"
                    action="listComChang _save.php"
                    name ="frmMain" id="frmMain" OnSubmit="return CheckValidate();" />
                <table class="inputcontenttable" ><br />
                    <tr align="top">
                        <td align="left">รหัสเครื่อง</td> 
                        <td> 
                            <select name="cn_number" id="cn_number">			
                                <?
                                include_once "../connect.php";
                                $strSQL = "SELECT  *  FROM product_detail LEFT  JOIN product ON product_detail.prd_id = product.prd_id WHERE pd_status = 'NoUse'  AND type_id	= '4' ORDER BY pd_id ASC";
                                $objQuery = mysql_query($strSQL);
                                while ($objResuut = mysql_fetch_array($objQuery)) {
                                    ?>
                                    <option value="<?= $objResuut["pd_code"]; ?>"><?= $objResuut["pd_code"]; ?> <?= $objResuut["pd_name"]; ?></option>		

                                    <?
                                }
                                ?>
                            </select>
                        </td>

                        <td>K/B Brand/Model</td>                    
                        <td> 
                            <select name="c_keyboard" id="c_keyboard">			
                                <?
                                include_once "../connect.php";
                                $strSQL = "SELECT  *  FROM product_detail LEFT  JOIN product ON product_detail.prd_id = product.prd_id WHERE pd_status = 'NoUse'  AND type_id	= '1' ORDER BY pd_id ASC";
                                $objQuery = mysql_query($strSQL);
                                while ($objResuut = mysql_fetch_array($objQuery)) {
                                    ?>
                                    <option value="<?= $objResuut["pd_code"]; ?>"><?= $objResuut["pd_code"]; ?> <?= $objResuut["pd_name"]; ?></option>		
                                    <?
                                }
                                ?>
                            </select>
                        </td>
                    </tr>
                    <tr valign="top" >
                        <td>Mouse Brand/Model</td>
                        <td> 
                            <select name="c_mouse" id="c_mouse">			
                                <?
                                include_once "../connect.php";
                                $strSQL = "SELECT  *  FROM product_detail LEFT  JOIN product ON product_detail.prd_id = product.prd_id WHERE pd_status = 'NoUse'  AND type_id	= '2' ORDER BY pd_id ASC";
                                $objQuery = mysql_query($strSQL);
                                while ($objResuut = mysql_fetch_array($objQuery)) {
                                    ?>
                                    <option value="<?= $objResuut["pd_code"]; ?>"><?= $objResuut["pd_code"]; ?> <?= $objResuut["pd_name"]; ?></option>		
                                    <?
                                }
                                ?>
                            </select>
                        </td>
                        <td>Monitor Brand/Model</td>
                        <td> 
                            <select name="c_monitor" id="c_monitor">			
                                <?
                                include_once "../connect.php";
                                $strSQL = "SELECT  *  FROM product_detail LEFT  JOIN product ON product_detail.prd_id = product.prd_id WHERE pd_status = 'NoUse'  AND type_id	= '3' ORDER BY pd_id ASC";
                                $objQuery = mysql_query($strSQL);
                                while ($objResuut = mysql_fetch_array($objQuery)) {
                                    ?>
                                    <option value="<?= $objResuut["pd_code"]; ?>"><?= $objResuut["pd_code"]; ?> <?= $objResuut["pd_name"]; ?></option>		                                 
                                    <?
                                }
                                ?>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="5" align="center"><input align="center" type="submit" name="Submit" value="Save" style="height: 30px; width: 120px"/></td>
                    </tr>
                </table>
                <input name="Emp_id" type="hidden" value="<?= $Emp_id ?>"/>
                 <input name="Cn_id" type="hidden" value="<?= $Cn_id ?>"/>
                     <input name="C_id" type="hidden" value="<?= $C_id ?>"/>
                         <input name="Oth_id" type="hidden" value="<?= $Oth_id ?>"/>
                </form>
            </fieldset>
        </div>
    </body>
</html>
